const crypto = require("crypto")
const fs = require("fs")

module.exports = function(fiel_path) {
  try {

    let data = fs.readFileSync(fiel_path)
    let md5_hash = crypto.createHash("md5")
    md5_hash.update(data)

    return md5_hash.digest("hex")
  } catch (e) {
    if (e) {
      console.error("error when try to read file: " + fiel_path)
    }
  }
}